अवरुद्ध लेनदेन की धनवापसी बनाएँ
POST
/v1/external/blocked-transactions/{id}/refund
Servidor
स्टोर के अवरुद्ध लेनदेन की धनवापसी बनाता है। जमा भेजने वाले को धनवापसी बिना कोड के निर्धारित होती है और प्रतीक्षा के बाद भेजी जाती है (स्थिति scheduled)। दूसरे पते पर धनवापसी के लिए वॉलेट ईमेल पर भेजा कोड चाहिए (send-code), और वह स्टोर मालिक की स्वीकृति के बाद भेजी जाती है (स्थिति pending_review)
Autorizaciones
XApiKey
TipoAPI Key (header: X-Api-Key)
Parámetros
Parámetros de ruta
id*
Blocked transaction ID
Tipostring
RequeridoCuerpo de la solicitud
JSON
{
"code": "string",
"destination_address": "string"
}
Respuestas
OK
application/json
JSON
{
"code": 0,
"data": {
"amount": 0,
"amount_usd": 0,
"auth_method": "string",
"block_reasons": [
{
"risk_type": "string",
"threshold": 0,
"value": 0
}
],
"blockchain": "string",
"blocked_transaction_id": "string",
"created_at": "string",
"currency_code": "string",
"currency_id": "string",
"destination_address": "string",
"email": "string",
"execute_after": "string",
"from_address": "string",
"id": "string",
"last_error": "string",
"reviewed_at": "string",
"risk_level": "string",
"score": 0,
"status": "string",
"store_id": "string",
"to_address": "string",
"transaction_id": "string",
"transfer_id": "string",
"tx_hash": "string",
"updated_at": "string",
"wallet_id": "string"
},
"message": "string"
}
POST
/v1/external/blocked-transactions/{id}/refund
Servidor
Server
Muestras
cURL
curl -X POST \
'https://demo.dv.net/api/v1/external/blocked-transactions/{id}/refund' \
-H "Content-Type: application/json"JavaScript
fetch('https://demo.dv.net/api/v1/external/blocked-transactions/{id}/refund', {method:'POST',headers:{'Content-Type':'application/json'}})
.then(response => response.json())
.then(data => console.log(data));PHP
<?php
$url = 'https://demo.dv.net/api/v1/external/blocked-transactions/{id}/refund';
$method = 'POST';
$headers = [
'Content-Type' => 'application/json',
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>Python
import requests
url = 'https://demo.dv.net/api/v1/external/blocked-transactions/{id}/refund'
headers = {
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers)
print(response.json())